﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace LINQtoSQL.EntryObjs
{
    [Table("Student")]
    public class Student
    {
        [Key]
        [Column("sno", TypeName = "nchar(10)")]
        [Required]
        [MaxLength(10)]
        public string Sno { get; set; }

        [Column("sname", TypeName = "text")]
        public string Sname { get; set; } = "无名氏";

        [Column("birthday", TypeName = "date")]
        public DateTime? Birthday { get; set; }

        [Column("stu_grage", TypeName = "numeric(3,1)")]
        public decimal? StuGrage { get; set; }

        [Column("check_order")]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long CheckOrder { get; set; }
    }
}
